package com.buer.storage.service.impl;

import com.buer.storage.dao.IndexDao;
import com.buer.storage.entity.Dorder;
import com.buer.storage.service.IndexService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Service
public class IndexServiceImpl implements IndexService {

    @Resource
    private IndexDao indexDao;
    @Override
    public List<Map> selectWorder() {
        List<Map> list=new ArrayList<>();
        int dorder = indexDao.selectDorder();
        int worder = indexDao.selectWorder();
        int aorder = indexDao.selectAorder();
        int corder = indexDao.selectCorder();
        int destroy = indexDao.selectDestroy();
        int OverdueWarning = indexDao.selectGetDate();

        Map map = new HashMap();
        map.put("Dorder",dorder);
        map.put("Worder",worder);
        map.put("Aorder",aorder);
        map.put("Corder",corder);
        map.put("Destroy",destroy);
        map.put("OverdueWarning",OverdueWarning);

       list.add(map);
       return list;
    }
}
